<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="lib/bootstrap.min.4.5.0.css">
    <link rel="stylesheet" href="lib/codemirror/lib/codemirror.css">
    <link rel="stylesheet" href="lib/codemirror/theme/base16-light.css">
    <link rel="stylesheet" href="lib/codemirror/addon/fold/foldgutter.css">
    <link rel="stylesheet" href="lib/codemirror/addon/lint/lint.css">
    <link rel="stylesheet" href="bp.css">
    <title>Business Process Based High Performance Scheduling Service / Tool</title>
  </head>
  <body>
    <h3 style="text-align: center; margin: 32px;">Business Process Based High Performance Scheduling Service / Tool</h1>

    <div class="container-fluid">
        <div class="row">
            <div class="col">
                <div class="form-group">
                    <label>Process BPMN 2.0 Xml</label>
                    <textarea id="content" class="form-control" style="height: 500px;" >
<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="sample-diagram" targetNamespace="http://bpmn.io/schema/bpmn" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd">
    <bpmn2:process id="process-255576e8-4c96-4911-b19b-1cdb33e6c421" name="automation" isExecutable="true">
    <bpmn2:documentation />
    <bpmn2:startEvent id="StartEvent_1">
        <bpmn2:outgoing>SequenceFlow_1k98z8o</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:sequenceFlow id="SequenceFlow_1k98z8o" sourceRef="StartEvent_1" targetRef="ServiceTask_0em0nmt" />
    <bpmn2:sequenceFlow id="SequenceFlow_1ltlcxk" sourceRef="ServiceTask_0em0nmt" targetRef="ServiceTask_0tt533q" />
    <bpmn2:sequenceFlow id="SequenceFlow_04gcty3" sourceRef="ServiceTask_0tt533q" targetRef="ServiceTask_1s6d5g9" />
    <bpmn2:endEvent id="EndEvent_0gn4cv2">
        <bpmn2:incoming>SequenceFlow_1ytdgjc</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:sequenceFlow id="SequenceFlow_1ytdgjc" sourceRef="ServiceTask_1s6d5g9" targetRef="EndEvent_0gn4cv2" />
    <bpmn2:serviceTask id="ServiceTask_0em0nmt" name="a" implementation="a">
        <bpmn2:incoming>SequenceFlow_1k98z8o</bpmn2:incoming>
        <bpmn2:outgoing>SequenceFlow_1ltlcxk</bpmn2:outgoing>
    </bpmn2:serviceTask>
    <bpmn2:serviceTask id="ServiceTask_0tt533q" name="b" implementation="b">
        <bpmn2:incoming>SequenceFlow_1ltlcxk</bpmn2:incoming>
        <bpmn2:outgoing>SequenceFlow_04gcty3</bpmn2:outgoing>
    </bpmn2:serviceTask>
    <bpmn2:serviceTask id="ServiceTask_1s6d5g9" name="c" implementation="c">
        <bpmn2:incoming>SequenceFlow_04gcty3</bpmn2:incoming>
        <bpmn2:outgoing>SequenceFlow_1ytdgjc</bpmn2:outgoing>
    </bpmn2:serviceTask>
    </bpmn2:process>
</bpmn2:definitions>
                    </textarea>
                    <small id="contentHelp" class="form-text text-muted">The xml could be generated by <a href="https://github.com/Activiti/activiti-modeling-app" target="_blank">activiti modeler</a>. More information could be found <a href="https://activiti.gitbook.io/activiti-7-developers-guide/components/activiti-cloud-modeling">here</a>.</small>
                </div>
            </div>
            <div class="col">
                <div class="form-group">
                    <label>Service task functions</label>
                    <textarea id="script" class="form-control" style="height: 500px;" >
/* jshint esversion: 8 */
const a = 1;
return {
    a: async (states) => states.a = a + states.init,
    b: async (states) => states.b = 2,
    c: async (states) => states.result = states.a + states.b
}
                    </textarea>
                    <small id="scriptHelp" class="form-text text-muted">The function implementations referenced by service tasks in the process bpmn 2.0 xml.</small>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col">
                <div class="form-group">
                    <label>Initial data for a test run</label>
                    <textarea id="data" class="form-control" style="height: 150px;" >
{ "init": 10 }
                    </textarea>
                    <small id="dataHelp" class="form-text text-muted">The json-formatted initial data for a test run.</small>
                </div>
            </div>
        </div>
        <div class="row" style="margin-bottom: 16px;">
            <div class="col">
                    <button id='run-test-btn' type="button" class="btn btn-primary">Run a test</button>
            </div>
        </div>
        <div class="row">
            <div class="col">
                <div style="display: none;" id="success-msg" class="alert alert-success" role="alert">
                    A simple success alert—check it out!
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col">
                <div style="display: none;" id="error-msg" class="alert alert-danger" role="alert">
                    A simple danger alert—check it out!
                </div>
            </div>
        </div>
    </div>

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->

    <script src="lib/jquery-3.5.1.min.js"></script>
    <script src="lib/popper.min.1.16.0.js"></script>
    <script src="lib/bootstrap.min.4.5.0.js"></script>
    <script src="lib/codemirror/lib/codemirror.js"></script>
    <script src="lib/codemirror/mode/javascript/javascript.js"></script>
    <script src="lib/codemirror/mode/xml/xml.js"></script>
    <script src="lib/codemirror/addon/selection/active-line.js"></script>
    <script src="lib/codemirror/addon/edit/matchbrackets.js"></script>
    <script src="lib/codemirror/addon/edit/closebrackets.js"></script>
    <script src="lib/codemirror/addon/edit/closetag.js"></script>
    <script src="lib/codemirror/addon/edit/matchtags.js"></script>
    <script src="lib/codemirror/addon/edit/trailingspace.js"></script>
    <script src="lib/codemirror/addon/fold/foldcode.js"></script>
    <script src="lib/codemirror/addon/fold/foldgutter.js"></script>
    <script src="lib/codemirror/addon/fold/xml-fold.js"></script>
    <script src="lib/codemirror/addon/fold/brace-fold.js"></script>
    <script src="lib/codemirror/addon/fold/comment-fold.js"></script>
    <script src="lib/codemirror/addon/fold/indent-fold.js"></script>
    <script src="lib/codemirror/addon/fold/indent-fold.js"></script>
    <script src="lib/jshint.2.11.1.js"></script>
    <script src="lib/jsonlint.1.6.3.js"></script>
    <script src="lib/codemirror/addon/lint/lint.js"></script>
    <script src="lib/codemirror/addon/lint/javascript-lint.js"></script>
    <script src="lib/codemirror/addon/lint/json-lint.js"></script>
    <script src="lib/lodash.min.4.17.15.js"></script>
    <script src="bp.js"></script>
  </body>
</html>